package cn.bsb.service.rece;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bsb.dao.DevUserMapper;
import cn.bsb.pojo.DevUser;

@Service
public class LoginService {

	@Autowired
	private DevUserMapper loginMapper;

	public DevUser loginUser(String userCode, String userPassword) {

		return loginMapper.findOne(userCode, userPassword);
	}

	public int addUser(DevUser devUser) {

		return loginMapper.addUser(devUser);
	}

	public DevUser getUser(Integer id) {
		return loginMapper.getUser(id);
	}

	public DevUser getUserCodeByuser_Code(String user_code) {

		return loginMapper.getUserCodeByuser_Code(user_code);
	}
}
